package com.android.lovingpet.bean;

import android.os.Parcel;
import android.os.Parcelable;

import org.litepal.crud.DataSupport;

import java.util.List;

public class Team extends DataSupport implements Parcelable {

    private int realId;
    private int id;

    //teamProfile
    private String adoptRules;
    private String finance;
    private String p_introduction;
    private String jobRules;
    private String purpose;
    private String tCondition;
    private String work;

    //teamHead
    private String hIntroduction;
    private String hName;
    private String hPhone;
    private String idCard;
    private String realName;

    //teamInfo
    private String address;
    private String codeNumber;
    private String email;
    private String etime;
    private int grade;
    private String image;
    private String introduction;
    private String name;
    private String nature;
    private String oPhone;
    private String proof;

    @Override
    public boolean equals(Object obj) {
        return obj == this || obj instanceof Team && realId == ((Team) obj).realId;
    }

    public boolean saveOrUpdate() {
        return saveOrUpdate("realId = ?", realId + "");
    }

    public Team() {
    }

    public int getRealId() {
        return realId;
    }

    public void setRealId(int realId) {
        this.realId = realId;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getAdoptRules() {
        return adoptRules;
    }

    public void setAdoptRules(String adoptRules) {
        this.adoptRules = adoptRules;
    }

    public String getFinance() {
        return finance;
    }

    public void setFinance(String finance) {
        this.finance = finance;
    }

    public String getP_introduction() {
        return p_introduction;
    }

    public void setP_introduction(String p_introduction) {
        this.p_introduction = p_introduction;
    }

    public String getJobRules() {
        return jobRules;
    }

    public void setJobRules(String jobRules) {
        this.jobRules = jobRules;
    }

    public String getPurpose() {
        return purpose;
    }

    public void setPurpose(String purpose) {
        this.purpose = purpose;
    }

    public String gettCondition() {
        return tCondition;
    }

    public void settCondition(String tCondition) {
        this.tCondition = tCondition;
    }

    public String getWork() {
        return work;
    }

    public void setWork(String work) {
        this.work = work;
    }

    public String gethIntroduction() {
        return hIntroduction;
    }

    public void sethIntroduction(String hIntroduction) {
        this.hIntroduction = hIntroduction;
    }

    public String gethName() {
        return hName;
    }

    public void sethName(String hName) {
        this.hName = hName;
    }

    public String gethPhone() {
        return hPhone;
    }

    public void sethPhone(String hPhone) {
        this.hPhone = hPhone;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCodeNumber() {
        return codeNumber;
    }

    public void setCodeNumber(String codeNumber) {
        this.codeNumber = codeNumber;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getEtime() {
        return etime;
    }

    public void setEtime(String etime) {
        this.etime = etime;
    }

    public int getGrade() {
        return grade;
    }

    public void setGrade(int grade) {
        this.grade = grade;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNature() {
        return nature;
    }

    public void setNature(String nature) {
        this.nature = nature;
    }

    public String getoPhone() {
        return oPhone;
    }

    public void setoPhone(String oPhone) {
        this.oPhone = oPhone;
    }

    public String getProof() {
        return proof;
    }

    public void setProof(String proof) {
        this.proof = proof;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.realId);
        dest.writeInt(this.id);
        dest.writeString(this.adoptRules);
        dest.writeString(this.finance);
        dest.writeString(this.p_introduction);
        dest.writeString(this.jobRules);
        dest.writeString(this.purpose);
        dest.writeString(this.tCondition);
        dest.writeString(this.work);
        dest.writeString(this.hIntroduction);
        dest.writeString(this.hName);
        dest.writeString(this.hPhone);
        dest.writeString(this.idCard);
        dest.writeString(this.realName);
        dest.writeString(this.address);
        dest.writeString(this.codeNumber);
        dest.writeString(this.email);
        dest.writeString(this.etime);
        dest.writeInt(this.grade);
        dest.writeString(this.image);
        dest.writeString(this.introduction);
        dest.writeString(this.name);
        dest.writeString(this.nature);
        dest.writeString(this.oPhone);
        dest.writeString(this.proof);
    }

    protected Team(Parcel in) {
        this.realId = in.readInt();
        this.id = in.readInt();
        this.adoptRules = in.readString();
        this.finance = in.readString();
        this.p_introduction = in.readString();
        this.jobRules = in.readString();
        this.purpose = in.readString();
        this.tCondition = in.readString();
        this.work = in.readString();
        this.hIntroduction = in.readString();
        this.hName = in.readString();
        this.hPhone = in.readString();
        this.idCard = in.readString();
        this.realName = in.readString();
        this.address = in.readString();
        this.codeNumber = in.readString();
        this.email = in.readString();
        this.etime = in.readString();
        this.grade = in.readInt();
        this.image = in.readString();
        this.introduction = in.readString();
        this.name = in.readString();
        this.nature = in.readString();
        this.oPhone = in.readString();
        this.proof = in.readString();
    }

    public static final Parcelable.Creator<Team> CREATOR = new Parcelable.Creator<Team>() {
        @Override
        public Team createFromParcel(Parcel source) {
            return new Team(source);
        }

        @Override
        public Team[] newArray(int size) {
            return new Team[size];
        }
    };
}
